package day7;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class TourTest {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        //Tourist s = new Tourist();
        while (true) {
            Tourist s = new Tourist();
            System.out.println("请输入姓名：");
            String x = in.next();
            if(x.equals("n")) {
                System.out.println("退出程序");
                break;
            }
            s.name=x;
            System.out.println("请输入年龄：");
            s.age=in.nextInt();
            s.calc();
//            if(y >= 20) {
//                System.out.println(x+"游客的年龄："+y+",门票价格为："+y+"元");
//            }else if (y <= 5) {
//                System.out.println(x + "游客的年龄：" + y + ",门票免费");
//            }
        }
    }
}
